package dome1;//求字符串中第一给只出现一次的字符（只包含小谢字母）；

import java.util.Scanner;

public class text1 {
    public  static int fun(String str1) {
        int[] count = new int[265];
        for (int i = 0; i < str1.length(); i++) {
            count[str1.charAt(i)]++;
        }
        for (int i = 0; i < str1.length(); i++) {
            if (1 == count[str1.charAt(i)]) {
                return i;
            }
        }  return -1;
    }

    public static void main(String[] args){
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入您要查找的字符串");
        String str1= scanner.nextLine();
        int a= fun(str1);
        System.out.println(str1.charAt(a));
    }
}
